(defun primep (x)
  (cond ((< x 4) T)
	((zerop (mod x 2)) nil)
	( t
	 (let ((sqrt-x (sqrt x)))
	   (do ((i 3 (+ i 2)))
	       ((> i sqrt-x) t)
	     (when (zerop (mod x  i)) 
	       (return nil)))))))

(defun probl-10 ()
  (let ((sum 2))
    (do ((i 3 (+ 2 i)))
	((>= i 1000000) sum)
      (if (primep i) (setq sum (+ i sum))))))